xentrace: reduce trace buffer size to something mfn_offset can reach
authorOlaf Hering <olaf@aepfle.de>
Thu, 26 May 2011 11:34:44 +0000 (12:34 +0100)
committerOlaf Hering <olaf@aepfle.de>
Thu, 26 May 2011 11:34:44 +0000 (12:34 +0100)
commit2a75eac8cda756d414f6b23d9606fcb3ac376861
tree1773c445e5753a8d1c00995dc030e977b0e03884
parentceaeb86bf7c6ec358c32bf8d221a51830f1ccae5
xentrace: reduce trace buffer size to something mfn_offset can reach

The start of the array which holds the list of mfns for each cpus
tracebuffer is stored in an unsigned short. This limits the total
amount of pages for each cpu as the number of active cpus increases.

Update the math in calculate_tbuf_size() to apply also this rule to
the max number of trace pages. Without this change the index can
overflow.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Acked-by: George Dunlap <george.dunlap@eu.citrix.com>
xen/common/trace.c